#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>

#include "time.h"

namespace violet::core {

struct Header {
    friend class boost::serialization::access;

    int64_t            id{0};
    std::string        name{""};
    violet::time::Time stamp{violet::time::Time::Now()};

    Header() = default;                                              // the default constructer
    Header(int64_t _id, std::string _name) : id(_id), name(_name) {} // constructer without function init value
    Header(int64_t _id, std::string _name, time::Time _stamp)
            : id(_id), name(_name), stamp(_stamp) {} // full value constructer

    template <class _Archive>
    void serialize(_Archive& arch, const uint32_t /* file_version */) {
        arch & id & name & stamp;
    }
};

} // namespace violet::core